<!--<meta http-equiv="refresh" content="1"/>-->
<link href="__PUBLIC__/Admin/css/same.css"  type="text/css" rel="stylesheet"/>
<script src="__PUBLIC__/js/jquery-1.11.3.min.js" type="text/javascript"></script>
<link href="__PUBLIC__/css/bootstrap.css"  type="text/css" rel="stylesheet"/>
<script src="__PUBLIC__/js/layer/layer.js" type="text/javascript"></script>
<script src="__PUBLIC__/js/bootstrap.js" type="text/javascript"></script>
<script src="__PUBLIC__/Admin/js/ReadRecord.js" type="text/javascript"></script>
<div class="a-main-left-content">
    <div class="a_con_title">
        <h4>读者档案管理</h4>
    </div>
    <div class="a_title_tip">
        <img class="a_record_icon" src="/Public/img/record_01.jpg"/>
        <span class="a_record_news">请认真对待读者信息，如有泄露追究法律责任。</span>
    </div>

    <div class="read_type_box">
        <div class="record_sousuo">
            <form action="{:U('Admin/ReadManage/readRecordManage')}" method="post">
                <span>读者名称</span>
                <input type="text" name="u_name">
                <span>读者邮箱</span>
                <input type="email" name="u_email">
                <span>读者类型：</span>
                <select name="u_type_name">
                    <option value="">请选择</option>
                    <volist name="_getAllReadType" id="so">
                        <option value="{$so['u_type_name']}">{$so['u_type_name']}</option>
                    </volist>
                </select>
                <div class="read_submit_record">
                    <img src="__PUBLIC__/Admin/img/record_02.jpg" alt="搜索">
                    <input type="submit" value="查询" >
                </div>
            </form>
            <!-- Modal -->
            <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
                <div class="modal-dialog" role="document">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                            <h4 class="modal-title" id="myModalLabel">读者信息添加</h4>
                        </div>
                        <div class="modal-body">
                            <div class="top_form_read">
                                <span>读者名称：</span>
                                <input type="text" name="u_name" placeholder="&nbsp;&nbsp;请输入读者名称" id="u_name">
                            </div>
                            <div class="top_form_read">
                                <span> 读者邮箱：</span>
                                <input type="email" name="u_email" placeholder="&nbsp;&nbsp;请输入读者邮箱" id="u_email">
                            </div>
                            <div class="top_form_read">
                                <span>读者密码：</span>
                                <input type="password" name="u_pwd" placeholder="&nbsp;&nbsp;请输入读者密码" id="u_pwd">
                            </div>
                            <div class="top_form_read">
                                <span>重复密码：</span>
                                <input type="password" name="u_repwd" placeholder="&nbsp;&nbsp;请输入重复密码" id="u_repwd">
                            </div>
                            <div class="top_form_read">
                                <span>读者性别：</span>
                                <select name="u_sex" id="u_sex">
                                    <option value="1">未设置</option>
                                    <option value="2">女</option>
                                    <option value="3">男</option>
                                </select>
                            </div>
                            <div class="top_form_read">
                                <span>读者类型：</span>
                                <select name="u_type_id" id="u_type_id">
                                    <volist name="_getAllReadType" id="so">
                                        <option value="{$so['u_type_id']}">{$so['u_type_name']}</option>
                                    </volist>
                                </select>
                            </div>
                            <div class="top_form_read">
                                <span>读者电话：</span>
                                <input type="text" name="u_tel" placeholder="&nbsp;&nbsp;请输入读者电话" id="u_tel" onkeyup="value=this.value.replace(/\D+/g,'')">
                            </div>
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                            <button type="button" class="btn btn-primary add" >添加</button>
                        </div>
                        <input type="hidden" value="{:U('Admin/ReadManage/readRecordAdd')}" id="add-url">
                    </div>
                </div>
            </div>
            <!----->
        </div>
        <div class="read_type_table" style="width: 920px;margin-left: 30px">
            <div class="table_span">
                <span>读者档案信息</span>
                <button type="button" data-toggle="modal" data-target="#myModal" class="table_span_right">
                    添加
                </button>
            </div>
            <div class="height_con">
                <table class="table_record">
                    <tr >
                        <th>读者名称</th>
                        <th>读者邮箱</th>
                        <th>读者性别</th>
                        <th>读者电话</th>
                        <th>读者类型</th>
                        <th>认证状态</th>
                        <th>操作</th>
                    </tr>
                    <volist name="_getUserAndType" id="vo">
                        <if condition="$vo['u_del'] eq 1">
                            <tr class="table_td">
                                <td>{$vo['u_name']}</td>
                                <td>{$vo['u_email']}</td>
                                <if condition="$vo['u_sex'] eq 1">
                                    <td>未设置</td>
                                </if>
                                <if condition="$vo['u_sex'] eq 2">
                                    <td>女</td>
                                </if>
                                <if condition="$vo['u_sex'] eq 3">
                                    <td>男</td>
                                </if>
                                <td>{$vo['u_tel']}</td>
                                <td>{$vo['u_type_name']}</td>
                                <if condition="$vo['u_status'] eq 1">
                                    <td>未认证</td>
                                </if>
                                <if condition="$vo['u_status'] eq 2">
                                    <td>认证</td>
                                </if>
                                <if condition="$vo['u_status'] eq 3">
                                    <td>待认证</td>
                                </if>
                                <td>
                                    <a class="wyz_a" href="{:U('Admin/ReadManage/readRecordSave',array('id'=>$vo['u_id']))}" ><button class="wyz_bb">编辑</button></a>
                                    <button class="del wyz_dd1" data-id-del="{$vo['u_id']}">删除</button>
                                </td>
                            </tr>
                            <else/>
                            <tr class="table_td">
                                <td>{$vo['u_name']}</td>
                                <td>{$vo['u_email']}</td>
                                <if condition="$vo['u_sex'] eq 1">
                                    <td>未认证</td>
                                </if>
                                <if condition="$vo['u_sex'] eq 2">
                                    <td>女</td>
                                </if>
                                <if condition="$vo['u_sex'] eq 3">
                                    <td>男</td>
                                </if>
                                <td>{$vo['u_tel']}</td>
                                <td>{$vo['u_type_name']}</td>
                                <if condition="$vo['u_status'] eq 1">
                                    <td>未认证</td>
                                </if>
                                <if condition="$vo['u_status'] eq 2">
                                    <td>认证</td>
                                </if>
                                <if condition="$vo['u_status'] eq 3">
                                    <td>待认证</td>
                                </if>
                                <td>
                                    <button class="rec wyz_bb" data-id-rec="{$vo['u_id']}">恢复</button>
                                </td>
                            </tr>
                        </if>
                    </volist>
                    <input type="hidden" value="{:U('Admin/ReadManage/readRecordDel')}" id="del-url">
                    <input type="hidden" value="{:U('Admin/ReadManage/readRecordRec')}" id="rec-url">
                </table>
            </div>
        </div>
    </div>
</div>